﻿
$(document).ready(function () {
    alert(1);
    js_province = new Object();
    js_city = new Object();
    js_province['province'] = new Array('内蒙', '广东', '山东', '福建', '江苏');
    js_city['内蒙'] = new Array('内蒙城市1', '内蒙城市2');
    js_city['广东'] = new Array('广东城市1', '广东城市2', '广东城市3');
    js_city['山东'] = new Array('山东城市1', '山东城市2', '山东城市3');
    js_city['福建'] = new Array('福建城市1', '福建城市2', '福建城市3', '福建城市4');
    js_city['江苏'] = new Array('江苏城市1', '江苏城市2', '江苏城市3', '江苏城市4', '江苏城市5');


    var html = '';
    for (var i = 0; i < js_province["province"].length; i++) {
        html += '<option>' + js_province["province"][i] + '</option>';
    }

    alert(html);
    $('#test').html(html).children().click(function () {
        var city = $(this).text();
        var city_html = '';
        for (var i = 0; i < js_city[city].length; i++) {
            city_html += '<option>' + js_city[city][i] + '</option>';
        }

        $('#cityhtml').html(city_html).children().click(function () {
            alert($(this).text());
        })


    })
})

